using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace ASPNETVN.PORTAL.Components.Security
{
    public partial class Role
    {
        public static DataSet SelectAllByPortalID(Guid portalID)
        {
            const string spName = "[dbo].[p_SYSTEM_Role_SelectAll_ByPortalID]";
            SqlDatabase db = (SqlDatabase) DatabaseFactory.CreateDatabase();
            SqlCommand dbCommand = (SqlCommand)db.GetStoredProcCommand(spName);
            db.AddInParameter(dbCommand, "@PortalID", SqlDbType.UniqueIdentifier, portalID);

            return db.ExecuteDataSet(dbCommand);
        }
    }
}